package com.ruoyi.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.VoucherDetailMapper;
import com.ruoyi.finance.domain.VoucherDetail;
import com.ruoyi.finance.service.IVoucherDetailService;

/**
 * 凭证明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-27
 */
@Service
public class VoucherDetailServiceImpl implements IVoucherDetailService 
{
    @Autowired
    private VoucherDetailMapper voucherDetailMapper;

    /**
     * 查询凭证明细
     * 
     * @param detailId 凭证明细主键
     * @return 凭证明细
     */
    @Override
    public VoucherDetail selectVoucherDetailByDetailId(Long detailId)
    {
        return voucherDetailMapper.selectVoucherDetailByDetailId(detailId);
    }

    /**
     * 查询凭证明细列表
     * 
     * @param voucherDetail 凭证明细
     * @return 凭证明细
     */
    @Override
    public List<VoucherDetail> selectVoucherDetailList(VoucherDetail voucherDetail)
    {
        return voucherDetailMapper.selectVoucherDetailList(voucherDetail);
    }

    /**
     * 新增凭证明细
     * 
     * @param voucherDetail 凭证明细
     * @return 结果
     */
    @Override
    public int insertVoucherDetail(VoucherDetail voucherDetail)
    {
        return voucherDetailMapper.insertVoucherDetail(voucherDetail);
    }

    /**
     * 修改凭证明细
     * 
     * @param voucherDetail 凭证明细
     * @return 结果
     */
    @Override
    public int updateVoucherDetail(VoucherDetail voucherDetail)
    {
        return voucherDetailMapper.updateVoucherDetail(voucherDetail);
    }

    /**
     * 批量删除凭证明细
     * 
     * @param detailIds 需要删除的凭证明细主键
     * @return 结果
     */
    @Override
    public int deleteVoucherDetailByDetailIds(Long[] detailIds)
    {
        return voucherDetailMapper.deleteVoucherDetailByDetailIds(detailIds);
    }

    /**
     * 删除凭证明细信息
     * 
     * @param detailId 凭证明细主键
     * @return 结果
     */
    @Override
    public int deleteVoucherDetailByDetailId(Long detailId)
    {
        return voucherDetailMapper.deleteVoucherDetailByDetailId(detailId);
    }
}
